;
! function() {
	var ajaxUrl = "/bizjobsordersubmitresult/updateBizJobsOrderSubmitResultStatus";

	$(document).on("click", ".span-url", function() {
		var url = $(this).html();
		window.open("" + url + "");
	});

	$(".span-url").hover(function() {
		$(this).css("text-decoration", "underline");
		$(this).css("color", "red");
	}, function() {
		$(this).css("text-decoration", "none");
		$(this).css("color", "black");
	});
	
	function callback(result) {
		if(result.status == 0) {
			location = "/bizJobsNoAuditingList";
		} else {
			layer.msg("提交失败");
		}
	}

	function atferSuccess(){
		layer.close(index);
	}
	// 审核信息
	$(document).on("click", ".submit-btn", function() {
		var type = $(this).attr("id");
		var id = $("#id").html();
		var price = $("#price").html();
		if(type == 0){
			layer.confirm('确定提交吗?', {
				icon: 3,
				title: '温馨提示'
			}, function(index) {
				$.ajax({
					url: ajaxUrl,
					type: "post",
					data: {
						"id": id,
						"type": type,
						"price": price
					},
					success: callback,
					complete: layer.close(index)
				});
				
			});
		}else if(type ==1 ){
			layer.confirm('该任务订单的佣金为'+price+',确定提交吗?', {
				icon: 3,
				title: '温馨提示'
			}, function(index) {
				$.ajax({
					url: ajaxUrl,
					type: "post",
					data: {
						"id": id,
						"type": type,
						"price": price
					},
					success: callback,
					complete: layer.close(index)
				});
				
			});
		}
	});
}();